﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;

namespace Entity
{
    /// <summary>
    /// 项目
    /// </summary>
    public class Project : INotifyPropertyChanged
    {
        public int ProjectID { get; set; }

        private string _projectName;
        public string ProjectName 
        {
            get { return _projectName; }
            set
            {
                _projectName = value;
                if (this.PropertyChanged != null)
                {
                    NotifyPropertyChanged("ProjectName");
                }
            }
        }

        public DateTime CreateTime { get; set; }

        public ICollection<ToDo> ToDos { get; set; }

        public event PropertyChangedEventHandler PropertyChanged;

        private void NotifyPropertyChanged(String propertyName = "")
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

    }
}
